if {[tk_dialog .delete {Confirm Action} {Are you sure?} {} 0 Cancel]
== 0} {
clearAction
}
}
.buttons.delete config -command deleteAction
proc fileAction {} {
tk_dialog .fileSelection {File Selection} {This is a dummy file selection dialog box, which is used because there isn't a good file selection dialog built into Tk yet.} {} 0 OK
bind Menu <<Help>> {Help [winfo containing %X %Y] %X %Y}
# Help text and commands follow:
set helpTopics(.menu.file) {This is the "file" menu. It can be used to invoke some overall operations on the rolodex applications, such as loading a file or exiting.}
set helpCmds(.menu.file.m) {getMenuTopic $topic $x $y}
set helpTopics(.menu.file.m.1) {The "Load" entry in the "File" menu posts a dialog box that you can use to select a rolodex file}
set helpTopics(.menu.file.m.2) {The "Exit" entry in the "File" menu causes the rolodex application to terminate}
set helpCmds(.menu.file.m.none) {set topic ".menu.file"}
set helpTopics(.frame.entry1) {In this field of the rolodex entry you should type the person's name}
set helpTopics(.frame.entry2) {In this field of the rolodex entry you should type the first line of the person's address}
set helpTopics(.frame.entry3) {In this field of the rolodex entry you should type the second line of the person's address}
set helpTopics(.frame.entry4) {In this field of the rolodex entry you should type the third line of the person's address}
set helpTopics(.frame.entry5) {In this field of the rolodex entry you should type the person's home phone number, or "private" if the person doesn't want his or her number publicized}
set helpTopics(.frame.entry6) {In this field of the rolodex entry you should type the person's work phone number}
set helpTopics(.frame.entry7) {In this field of the rolodex entry you should type the phone number for the person's FAX machine}
set helpCmds(.frame.label1) {set topic .frame.entry1}
set helpCmds(.frame.label2) {set topic .frame.entry2}
set helpCmds(.frame.label3) {set topic .frame.entry3}
set helpCmds(.frame.label4) {set topic .frame.entry4}
set helpCmds(.frame.label5) {set topic .frame.entry5}
set helpCmds(.frame.label6) {set topic .frame.entry6}
set helpCmds(.frame.label7) {set topic .frame.entry7}
set helpTopics(context) {Unfortunately, this application doesn't support context-sensitive help in the usual way, because when this demo was written Tk didn't have a grab mechanism and this is needed for context-sensitive help. Instead, you can achieve much the same effect by simply moving the mouse over the window you're curious about and pressing the Help or F1 keys. You can do this anytime.}
set helpTopics(help) {This application provides only very crude help. Besides the entries in this menu, you can get help on individual windows by moving the mouse cursor over the window and pressing the Help or F1 keys.}
set helpTopics(window) {This window is a dummy rolodex application created as part of Tom LaStrange's toolkit benchmark. It doesn't really do anything useful except to demonstrate a few features of the Tk toolkit.}
set helpTopics(keys) "The following accelerator keys are defined for this application (in addition to those already available for the entry windows):\n\nCtrl+A:\t\tAdd\nCtrl+C:\t\tClear\nCtrl+D:\t\tDelete\nCtrl+F:\t\tEnter file name\nCtrl+Q:\t\tExit application (quit)\nCtrl+S:\t\tSearch (dummy operation)"
set helpTopics(version) "This is version $version."